/*
 * read_count.c
 *
 *  Created on: Mar 30, 2012
 *      Author: root
 */


/* include readline */
#include	"unp.h"

int word_cnt(char* str){
	int count=0;
	char *p;
	p=strtok(str," ");
	if(p){
		count++;
	}
	while(p!=NULL){
		p=strtok(NULL," ");
		if(p){
			count++;
		}
	}
	return count;
}
